<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
    <script src="http://www.cxsvip.top/static/jquery.min.js"></script>

</head>
<body>
    <from>
        <select id="1">
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
        </select>
    </from>

    <script>


        $(document).on("change",'select',function(){
                var num1 = $(this).val();
                var id = Number($(this).attr('id'));
                var next_id = id+1;

                var have_select = $('#'+next_id+'').length;

                if(have_select){
                    if($('#'+next_id+'').nextAll().length){
                        $('#'+id+'').nextAll().remove();
                        console.log($('#'+next_id+'').nextAll().length);
                    }else {
                        $('#'+next_id+'').remove();
                        console.log($('#'+next_id+'').nextAll().length);
                    }


                }




                $(this).after(
                    '<select id="'+next_id+'">'+
                    '<option value="'+num1*0+'">'+num1*0+'</option>'+
                    '<option value="'+num1*1+'">'+num1*1+'</option>'+
                    '<option value="'+num1*2+'">'+num1*2+'</option>'+
                    '<option value="'+num1*3+'">'+num1*3+'</option>'+
                    '<option value="'+num1*4+'">'+num1*4+'</option>'+
                    '<option value="'+num1*5+'">'+num1*5+'</option>'+
                    '<option value="'+num1*6+'">'+num1*6+'</option>'+
                    '<option value="'+num1*7+'">'+num1*7+'</option>'+
                    '<option value="'+num1*8+'">'+num1*8+'</option>'+
                    '<option value="'+num1*9+'">'+num1*9+'</option>'+
                    '</select>'
                );



        })
    </script>
</body>
</html>